#include "../skyPict.h"
#ifdef _SKYWIN_

namespace Sky
{

    TBool PictManager::createPictFromFile( const StringPtr& file,PictPtr& pict,Callback doneCallback )
    {
        pict->getPict()->setSrcFile(const_cast<StringPtr&>(file));
        pict->getPict()->trySelfCreate();
        return vTrue;
    }


    TBool PictManager::createPictFromBuffer( const BufferPtr& buf,PictPtr& pict,Callback doneCallback )
    {
		BufferPtr buffer = const_cast<BufferPtr&>(buf);
        pict->getPict()->setSrcMem(buffer->getBuffer(),buffer->getSize());
        pict->getPict()->trySelfCreate();
        return vTrue;
    }



	const TSize OSPict::getSize()
	{
		return  TSize(_pict.getWidth(),_pict.getHeight());
	}

}
#endif
